<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>房间列表</h1>
<table>
<tr><th>房间号</th><th>房间类型</th><th>价格</th><th>床</th><th>桌子</th><th>椅子</th><th>电视</th><th>电脑</th><th>电话</th></tr>
<c:forEach items="${roomList }" var="room">
<tr><td>${room.roomId}</td><td>${room.roomType.typeName}</td><td>${room.roomType.price}</td>
<td>${room.roomResource.bed}</td>
<td>${room.roomResource.desk}</td>
<td>${room.roomResource.chair}</td>
<td>${room.roomResource.TV}</td>
<td>${room.roomResource.computer}</td>
<td>${room.roomResource.tel}</td>
<td><a href="delete?roomId=${room.roomId}">删除</a></td>
</tr>
</c:forEach>
</table>
<hr>
<h2>添加新的房间信息</h2>
<form action="add" method="post">
房间号：<input name="roomId" value="201"></br>
类型：<input name="typeName" value="单人间"></br>
价格：<input name="price" value="100"></br>
床：<input name="bed" value="1"></br>
桌子：<input name="desk" value="1"></br>
椅子：<input name="chair" value="1"></br>
电视：<input name="TV" value="1"></br>
电脑：<input name="computer" value="1"></br>
电话：<input name="tel" value="无"></br>
<input type="submit" value="添加"/>
</form>
<a href="test">test</a>
</body>
</html>